package com.mzy.tomcat.http;

import java.io.IOException;
import java.io.OutputStream;

public class MzyHttpResponse {

    private OutputStream outputStream;

    final private String respHeader = "HTTP/2 200 OK\n" +
            "content-type: text/html; charset=utf-8\n\n";

    public MzyHttpResponse(OutputStream outputStream) {
        this.outputStream = outputStream;
    }


    public void write(String respMsg) throws IOException {
        respMsg = respHeader + respMsg;
        outputStream.write(respMsg.getBytes());
    }
}
